<script>
   $(function() {
        $('#systemloggrid').datagrid({
            title: '系统日志',
            fit:true,
            singleSelect:true, 
            rownumbers:true,
            nowrap: false,
            striped: true,
            remoteSort: false,
            fitColumns: true,
            pagination:true,
			rownumbers:true,
            url:'backend.php?r=systemlog/list',
            columns: [[                 
                    { field: 'Module', title: '模块名称',width:250,align: 'center' },
                    { field: 'Action', title: '动作',width:250,  align: 'center' }, 
                    { field: 'User', title: '用户',width:250,  align: 'center' }, 
                    { field: 'Detail', title: '详细',width:250,  align: 'center' }, 
                    { field: 'Result', title: '操作结果',width:250,  align: 'center' },  
                    { field: 'IP', title: 'IP',width:250,  align: 'center' },  
                    { field: 'Time', title: '时间',width:270,  align: 'center' }  
                ]],
           toolbar:[{
					id:'btnreload',
					text:'刷新',
					iconCls:'icon-reload',
					handler:function(){
                        $('#systemloggrid').datagrid('reload');
					}
				}, '-', {
					id:'btnremove',
					text:'删除',
					iconCls:'icon-remove',
					handler:function(){
                        var selected = $('#systemloggrid').datagrid('getSelected');
                        if (selected){
                            Tool.delRequest({id:selected.ID}, 'backend.php?r=systemlog/delete',function(result){
                                if (result.success)
                                {
                                    $('#systemloggrid').datagrid('reload');
                                    $.messager.alert( '系统提示',result.msg, 'info');
                                }
                            });
                        }
                        else
                        {
                            $.messager.alert( '系统提示','请先选择数据', 'warning');	 
                        } 
					}
				}]
        });

    });
</script>
<table id="systemloggrid">

